package com.slowfly.rule.engine.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.slowfly.rule.engine.entity.Scene;
import com.slowfly.rule.engine.entity.Strategy;
import com.slowfly.rule.engine.param.StrategyParam;
import com.slowfly.rule.engine.result.PageResult;
import com.slowfly.rule.engine.result.StrategyResult;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author shalongfei
 * @since 2024-02-22
 */
public interface IStrategyService extends IService<Strategy> {

    void setCache();

    void editCache(int type, int id);

    List<StrategyResult> listStrategy();

    List<StrategyResult> listStrategyByParam(StrategyParam param);

    List<Strategy> listStrategy(Scene scene);

    String getScripts(Strategy strategy);

    Set<Integer> getFeatureIds(Strategy strategy);

    PageResult<StrategyResult> pageStrategy(StrategyParam param);

    boolean addStrategy(StrategyParam param);

    boolean editStrategy(StrategyParam param);

    boolean deleteStrategy(StrategyParam param);

}
